package com.shimao.celnet.payment.controller.apinotcheck;


import com.shimao.celnet.payment.config.ConstantConfig;
import com.shimao.celnet.payment.service.apiservice.AnalysisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/*
 * 功能描述: 定时任务手动开启控制类，用于测试或者运维
 * @Author: Matt
 * @Date: 2019/5/24 2:38
 */
@RestController
@RequestMapping("/task")
public class Task_TriggerController {

    @Autowired
    private AnalysisService analysisService;
    @Autowired
    private ConstantConfig constantConfig;
    /*
     * 功能描述: 对前一日的通联账单进行解析，并将数据解析进数据库
     * @Author: Matt
     * @Date: 2019/5/24 2:39
     */
    @RequestMapping("/tlrecord")
    public String startTLRecordTask(){
        analysisService.analysis(constantConfig.getMoreplusCustId());
        return "通联对账文件解析完成";
    }
}
